package com.example.demo5.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UseController {

    @GetMapping
    public String getMethod() {
        return "执行 GET 请求方式";
    }

    @PostMapping
    public String postMethod() {
        return "执行 POST 请求方式";
    }
}
